Currently, the screencast keyboard shortcut shows the UI to begin a
screencast, but there is no way to end it with a keyboard shortcut.
This behavior is inconvenient and seems to be a regression, as a wide
variety of online resources recommend using the same shortcut to start
and end screencasts.
This commit introduces a simple check when the showScreenRecordingUI
function is called by the show-screen-recording-ui keybinding.
If the showScreenRecordingUI function is called while a screencast
is in progress, the stopScreencast function is called instead
of opening the screenshot UI in screencast mode.
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5386
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3847>
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
restrictedModes,
- showScreenRecordingUI
+ () => {
+ if (this._screencastInProgress)
+ this.stopScreencast();
+ else
+ showScreenRecordingUI();
+ }
);
Main.wm.addKeybinding(